/* ==================================================================   
 * Created [2009-4-27 下午11:32:55] by Jon.King 
 * ==================================================================  
 * TSS 
 * ================================================================== 
 * mailTo:jinpujun@hotmail.com
 * Copyright (c) Jon.King, 2009-2012 
 * ================================================================== 
*/

package com.jinhe.tss.component.log;

import com.jinhe.tss.core.cachepool.Cacheable;
import com.jinhe.tss.core.cachepool.ICacheLoader;
import com.jinhe.tss.core.cachepool.TimeWrapper;
import com.jinhe.tss.core.cachepool.extend.assignment.AssignmentFactory;
import com.jinhe.tss.core.cachepool.extend.assignment.IAssignment;

/** 
 * <p> AssignmentCacheLoader.java </p> 
 * 重新载入日志输出执行类（LogOutputTask）的缓存项
 */
public class BusinessLoggerCacheLoader implements ICacheLoader {

    public Cacheable reloadCacheObject(Cacheable item) {
        String assignmentClassName = LogOutputTask.class.getName();
        IAssignment assignment = AssignmentFactory.getInstance().create(assignmentClassName);
        return new TimeWrapper(item.getKey(), assignment, item.getCyclelife());
    }

}

